# Modal spaces

## Overview

This repository contains the experiment files, data, and analyses used to produce the paper, "Modal spaces as a foundation for high-level cognition" by Eli Hecht and Jonathan Phillips. 

## Directory Structure
This repository is organized as follows:

Modal spaces:
* [materials](/materials/)
   * [contextsTable.csv](/materials/contextsTable.csv)
   * [actualActions.csv](/materials/textsCodingKey.csv)
* [qualtricsStudies](/qualtricsStudies/)
   * [Study 1a.docx](/qualtricsStudies/Study1a.docx)
   * [Study 1a.qsf](/qualtricsStudies/Study1a.qsf)
   * [Study 1b.docx](/qualtricsStudies/Study1b.docx)
   * [Study 1b.qsf](/qualtricsStudies/Study1b.qsf)
   * [Study 1c.docx](/qualtricsStudies/Study1c.docx)
   * [Study 1c.qsf](/qualtricsStudies/Study1c.qsf)
   * [Study 2.docx](/qualtricsStudies/Study2.docx)
   * [Study 2.qsf](/qualtricsStudies/Study2.qsf)
   * [Study 3.docx](/qualtricsStudies/Study3.docx)
   * [Study 3.qsf](/qualtricsStudies/Study3.qsf)
   * [Study 4.docx](/qualtricsStudies/Study4.docx)
   * [Study 4.qsf](/qualtricsStudies/Study4.qsf)
   * [Study 5a.docx](/qualtricsStudies/Study5a.docx)
   * [Study 5a.qsf](/qualtricsStudies/Study5a.qsf)
   * [Study 5b.docx](/qualtricsStudies/Study5b.docx)
   * [Study 5b.qsf](/qualtricsStudies/Study5b.qsf)
   * [Study 5c.docx](/qualtricsStudies/Study5c.docx)
   * [Study 5c.qsf](/qualtricsStudies/Study5c.qsf)
   * [Study 6.docx](/qualtricsStudies/Study6.docx)
   * [Study 6.qsf](/qualtricsStudies/Study6.qsf)
* [data](/data/)
   * [study1a.csv](/data/study1a.csv)
   * [study2a.csv](/data/study2a.csv)
   * [study3a.csv](/data/study3a.csv)
   * [study2.csv](/data/study2.csv)
   * [study3.csv](/data/study3.csv)
   * [study4.csv](/data/study4.csv)
   * [study5a.csv](/data/study5a.csv)
   * [study5b.csv](/data/study5b.csv)
   * [study5c.csv](/data/study5c.csv)
   * [study6.csv](/data/study6.csv)
* [manualCoding](/manualCoding/)
   * [textsCodingKey.csv](/materials/textsCodingKey.csv)
   * [decision_coding_rater1.csv](/manualCoding/decision_coding_rater1.csv)
   * [decision_coding_rater2.csv](/manualCoding/decision_coding_rater2.csv)
   * [decision_coding_rater3.csv](/manualCoding/decision_coding_rater3.csv) 
   * [texts_coding_rater1.csv](/manualCoding/texts_coding_rater1.csv)
   * [texts_coding_rater2.csv](/manualCoding/texts_coding_rater2.csv)
   * [texts_coding_rater3.csv](/manualCoding/texts_coding_rater3.csv)
* [nlpCoding](/nlpCoding/)
   * [nlpCoding.ipynb](/nlpCoding/nlpCoding.ipynb)
   * [pg_clusters](/nlpCoding/pg_clusters/)
      * [eps0.4_samp6](/nlpCoding/pg_clusters/eps0.4_samp6/)
         * [plots](/nlpCoding/pg_clusters/eps0.4_samp6/plots/)
         * [tables](/nlpCoding/pg_clusters/eps0.4_samp6/tables/)
   * [pg_decision_clusters](/nlpCoding/pg_decision_clusters/)
      * [eps0.4_samp6](/nlpCoding/pg_decision_clusters/eps0.4_samp6/)
         * [plots](/nlpCoding/pg_decision_clusters/eps0.4_samp6/plots/)
         * [tables](/nlpCoding/pg_decision_clusters/eps0.4_samp6/tables/)
* [writeUp](/writeup/)
   * [writeUp.Rmd](/writeup/writeUP.Rmd)
   * [writeUp.html](/writeup/writeUP.html)
* [computationOutputs](/computationOutputs/)
   * [pgPredictP.rda](/computationOutputs/pgPredictP.rda)
   * [pgPredictM.rda](/computationOutputs/pgPredictM.rda)
   * [pgPredictN.rda](/computationOutputs/pgPredictN.rda)
   * [pgNormInt.rda](/computationOutputs/pgNormInt.rda)
   * [pgNormM.rda](/computationOutputs/pgNormM.rda)
   * [pgNormP.rda](/computationOutputs/pgNormP.rda)
   * [decisionResults.rda](/computationOutputs/decisionResults.rda)
* [figs](/figs/)
   * [fig1.png](/figs/fig1.png)
   * [fig2.png](/figs/fig2.png)
   * [fig3.png](/figs/fig3.png)
   * [fig4.png](/figs/fig4.png)
   * [fig5.png](/figs/fig5.png)
   * [fig6.png](/figs/fig6.png)
   * [figS1.png](/figs/figS1.png)
   * [figS2.png](/figs/figS2.png)
   * [figS3.png](/figs/figS3.png)
   * [figS4.png](/figs/figS4.png)


## Data and Analyses
The data folder contains unprocessed data downloaded from Qualtrics that was subsequently anonymized. All analyses except algorithmic clustering of responses are completed within [writeUp.rmd](/writeup/writeUP.Rmd) based on these data as well as the materials and manual/nlp coding files, and the results are compiled in [writeUp.html](/writeup/writeUP.html). Figures are saved to [figs](/figs/). The code for alogirthmic clustering of responses is in [nlpCoding.ipynb](/nlpCoding/nlpCoding.ipynb) and the resulting tables and plots identifying repsonses by cluster are saved within folders that reference their DBSCAN parameters. For instance [/nlpCoding/pg_decision_clusters/eps0.4_samp6/plots/S13.html](/nlpCoding/pg_clusters/eps0.4_samp6/plots/S13.html) is a plot showing the clustering of context 13 possibility generation and decision responses at epsilon = 0.4 and MinPts = 6. To save processing time when running other analyses, the outputs from a few of the computation-intensive analyses are stored in [computationOutputs](/computationOutputs/), allowing us to simply read in the results instead of recalculating them each time. 
